#ifndef _LOG4CPLUS_H_
#define _LOG4CPLUS_H_

#include <log4cplus/logger.h>
#include <log4cplus/configurator.h>
#include <log4cplus/loggingmacros.h>

#define log_trace(str) LOG4CPLUS_TRACE(logs, str)
#define log_trace_fmt(...) LOG4CPLUS_TRACE_FMT(logs, __VA_ARGS__)

#define log_debug(str) LOG4CPLUS_DEBUG(logs, str)
#define log_debug_fmt(...) LOG4CPLUS_DEBUG_FMT(logs, __VA_ARGS__)

#define log_info(str) LOG4CPLUS_INFO(logs, str)
#define log_info_fmt(...) LOG4CPLUS_INFO_FMT(logs, __VA_ARGS__)

#define log_warn(str) LOG4CPLUS_WARN(logs, str)
#define log_warn_fmt(...) LOG4CPLUS_WARN_FMT(logs, __VA_ARGS__)

#define log_error(str) LOG4CPLUS_ERROR(logs, str)
#define log_error_fmt(...) LOG4CPLUS_ERROR_FMT(logs, __VA_ARGS__)

#define log_fatal(str) LOG4CPLUS_FATAL(logs, str)
#define log_fatal_fmt(...) LOG4CPLUS_FATAL_FMT(logs, __VA_ARGS__)

#define LogTrace() log_debug_fmt("")

extern log4cplus::Logger logs;

void log4cplush_init();

#endif // _LOG4CPLUS_H_
